﻿<Window x:Class="CPPEI.Coolzon.Designer.Views.ShortcutAction"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.Designer.Views"
        mc:Ignorable="d"
        Title="自定义操作" Height="300" Width="300" WindowStartupLocation="CenterScreen" Loaded="Window_Loaded"
        Style="{DynamicResource WindowStyle}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>
        <StackPanel Style="{DynamicResource ButtonPanelBackground}" Grid.Row="0" Orientation="Horizontal">
            <Button Name="_ctlAdd" Style="{DynamicResource AddButtonStyle}" FontSize="15" VerticalContentAlignment="Center" Width="36" Margin="3" ToolTip="增加" Click="_ctlAdd_Click"/>
            <Button Name="_ctlRemove" Style="{DynamicResource RemoveButtonStyle}" FontSize="15" Width="36" Margin="3" ToolTip="删除" Click="_ctlRemove_Click"/>
            <Button Name="_ctlEdit" Style="{DynamicResource EditButtonStyle}" FontSize="15" Width="36" Margin="3" ToolTip="编辑" Click="_ctlEdit_Click"/>
        </StackPanel>
        <ListView Grid.Row="1" x:Name="_ctlListView" MouseDoubleClick="_ctlListView_MouseDoubleClick" >
            <ListView.ItemTemplate>
                <DataTemplate DataType="DT:CustomAction">
                    <TextBlock Text="{Binding Caption}" Margin="3"/>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <Grid Grid.Row="2" Grid.ColumnSpan="2">
            <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Content="确定" Margin="0,0,20,0" Click="Button_Click" Width="75" />
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Name="cancel" Content="取消" Margin="20,0,0,0" Click="cancel_Click" Width="75"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
